function niceIn(a) {
    a.addClass("done")
}

!function (a) {
    a.extend({
        tipsBox: function (b) {
            var c, d, e;
            b = a.extend({
                obj: null,
                str: "+1",
                startSize: "12px",
                endSize: "36px",
                interval: 600,
                color: "#D47E74",
                callback: function () {
                }
            }, b), a("body").append("<span class='num'>" + b.str + "</span>"), c = a(".num"), d = b.obj.offset().left + b.obj.width() / 4, e = b.obj.offset().top - b.obj.height(), c.css({
                position: "absolute",
                left: d + "px",
                top: e + "px",
                "z-index": 9999,
                "font-size": b.startSize,
                "line-height": b.endSize,
                color: b.color
            }), c.animate({
                "font-size": b.endSize,
                opacity: "0",
                top: e - parseInt(b.endSize) + "px"
            }, b.interval, function () {
                c.remove(), b.callback()
            })
        }
    })
}(jQuery), $(function () {
    $("#btnSupport").click(function () {
        $.tipsBox({
            obj: $(this), str: "<b style='font-family:Microsoft YaHei;'>+1</b>", callback: function () {
                $.getJSON("/ajax/ajax.ashx", {
                    t: new Date,
                    action: "add_support",
                    id: $("h1").attr("cid")
                }, function (a) {
                    var b, c;
                    1 == a.status ? (b = parseInt($(".number").text()), $(".number").text(b + 1), $("#btnSupport").unbind("click")) : (c = dialog({content: a.msg}).show(), setTimeout(function () {
                        c.close().remove()
                    }, 2e3))
                })
            }
        }), niceIn($(this))
    })
});